
<?php 

foreach ($messages as $message):
?>
<div class="messages_area">
                    <?php if(!empty($message['contenu'])):?>
                    	<?php if(strlen($message['contenu']) < 110):?>
                    		<?php echo substr($message['contenu'], 0, 110)?>
                    	<?php endif;?>
                    	<?php if(strlen($message['contenu']) >= 110):?>
                    		<div class="moor"><a class="messagesmoor" href="#messages<?php echo $message['id']?>">
                    		<?php echo substr($message['contenu'], 0, 110)?>
	                    	...</a></div>
	                    <?php endif;?>
                    <?php endif;?>
                    
</div>

<?php
endforeach;
?>
<?php foreach ($messages as $message):?>
<div style="display:none">
	<div id="messages<?php echo $message['id']?>">
		<!--   <h1><u> echo $message['titre']; </u></h1> -->
		<?php echo $message['contenu']; ?>
	</div>
</div>
<?php  endforeach;?>

<script type="text/javascript">
$(document).ready(function()
	{
	/* This is basic - uses default settings */
		$("a.messagesmoor").fancybox();
	});
</script>
